653. Two Sum IV – Input is a BST

653. Two Sum IV – Input is a BST

Given a Binary Search Tree and a target number, return true if there exist two elements in the BST s…

112. Path Sum

112. Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all…

110. Balanced Binary Tree

110. Balanced Binary Tree

Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary …

270. Closest Binary Search Tree Value

270. Closest Binary Search Tree Value

Given a non-empty binary search tree and a target value, find the value in the BST that is closest t…

100. Same Tree

100. Same Tree

Given two binary trees, write a function to check if they are equal or not. Two binary trees are con…

107. Binary Tree Level Order Traversal II

107. Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, fro…

257. Binary Tree Paths

257. Binary Tree Paths

Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 …

400. Nth Digit

400. Nth Digit

Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, … Note:…

645. Set Mismatch

645. Set Mismatch

The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of …

202. Happy Number

202. Happy Number

Write an algorithm to determine if a number is “happy”. A happy number is a number defin…

返回顶部